In geometry, the Peano curve is the first example of a space-filling curve to be discovered, by Giuseppe Peano in 1890.. Peano's curve is a surjective, continuous function from the unit interval onto the unit square, however it is not injective. Peano was motivated by an earlier result of Georg Cantor that these two sets have the same cardinality. Because of this example, some authors use the phrase "Peano curve" to refer more generally to any space-filling curve..
In step , each square of is partitioned into nine smaller equal squares, and its center point is replaced by a contiguous subsequence of the centers of these nine smaller squares. This subsequence is formed by grouping the nine smaller squares into three columns, ordering the centers contiguously within each column, and then ordering the columns from one side of the square to the other, in such a way that the distance between each consecutive pair of points in the subsequence equals the side length of the small squares. There are four such orderings possible:
The Peano curve itself is the limit of the curves through the sequences of square centers, as goes to infinity.
(), () |
where "" means "draw forward", "+" means "turn clockwise 90°", and "−" means "turn anticlockwise 90°". The image in the introduction shows the images of the first three iterations of the rules.
The curve shown in the 'construction' section be constructed as follows:
() |
where "" means "draw forward", "+" means "turn clockwise 90°", and "−" means "turn anticlockwise 90°". The image above shows the first two iterations of the rule.
A "multiple radix" variant of this curve with different numbers of subdivisions in different directions can be used to fill rectangles of arbitrary shapes.
The Hilbert curve is a simpler variant of the same idea, based on subdividing squares into four equal smaller squares instead of into nine equal smaller squares.
|
|